package com.lisa.investigate;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebInitParam;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class testConfig
 */
@WebServlet(
		description = "配置文件测试", 
		urlPatterns = { "/IWantConfit" }, 
		initParams = { 
				@WebInitParam(name = "DRIVER", value = "oracle.jdbc.driver.OracleDriver"), 
				@WebInitParam(name = "USERNAME", value = "sgxtv2", description = "数据库访问名"), 
				@WebInitParam(name = "PASSWORD", value = "thsw_1234", description = "数据库密码"), 
//				@WebInitParam(name = "URL", value = "jdbc:oracle:thin:@122.224.94.108:8004:gadata", description = "数据库访问路径")
				@WebInitParam(name = "URL", value = "jdbc:oracle:thin:@172.17.1.42:1521:gadata", description = "数据库访问路径")
				
				/*@WebInitParam(name = "DRIVER", value = "DDDDDD"), 
				@WebInitParam(name = "USERNAME", value = "DCH", description = "数据库访问名"), 
				@WebInitParam(name = "PASSWORD", value = "123456", description = "数据库密码"), 
				@WebInitParam(name = "URL", value = "ddd", description = "数据库访问路径")*/
		})
public class testConfig extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public testConfig() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		response.getWriter().append("Served at: ").append(request.getContextPath());
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
